package thread

import (
	"sync"
)

func routineFunc() {
	for i := 0; i < 10; i++ {
		println("routineFunc:", i)
	}
}
func ff() {
	var wg sync.WaitGroup

	go routineFunc()

	wg.Add(1)
	go func(len int) {
		for i := 0; i < len; i++ {
			println("func:", i)
		}
		wg.Done()
	}(5)

	wg.Wait()

}
